using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class mtn_machineMap : EntityTypeConfiguration<mtn_machine>
    {
        public mtn_machineMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.Machine)
                .HasMaxLength(50);

            this.Property(t => t.Memory)
                .HasMaxLength(50);

            this.Property(t => t.OS)
                .HasMaxLength(50);

            this.Property(t => t.Drive)
                .HasMaxLength(50);

            this.Property(t => t.Description)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("mtn_machine");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.Machine).HasColumnName("Machine");
            this.Property(t => t.Memory).HasColumnName("Memory");
            this.Property(t => t.OS).HasColumnName("OS");
            this.Property(t => t.Drive).HasColumnName("Drive");
            this.Property(t => t.Source).HasColumnName("Source");
            this.Property(t => t.FirstConnection).HasColumnName("FirstConnection");
            this.Property(t => t.LastConnection).HasColumnName("LastConnection");
            this.Property(t => t.Count).HasColumnName("Count");
            this.Property(t => t.Department).HasColumnName("Department");
            this.Property(t => t.location).HasColumnName("location");
            this.Property(t => t.ward).HasColumnName("ward");
            this.Property(t => t.Description).HasColumnName("Description");
            this.Property(t => t.PatchingForced).HasColumnName("PatchingForced");
        }
    }
}
